﻿#include <learn/ais/ais_frame.h>

using namespace xi;
using namespace xi::ais;

AIS_Frame::AIS_Frame(int left, int top, int width, int height) : m_rect({left, top, width, height})
{
}

AIS_Frame::Rect AIS_Frame::rect() const
{
    return m_rect;
}

AIS_Frame::Rect &AIS_Frame::rect()
{
    return m_rect;
}

void AIS_Frame::visit(AIS_InitMsg *msg)
{
    // 利用工厂创建渲染器
    if (msg->factory)
        m_renderer.reset(msg->factory->create_product("AIS_Frame"));
}
